import {createStore,applyMiddleware} from 'redux'
import { composeWithDevTools } from 'redux-devtools-extension'
import thunk from 'redux-thunk'
import { getToken } from '@/utils'
import rootReducer from './reducers'
const middlewares=composeWithDevTools(applyMiddleware(thunk))

const initialState={
    login:getToken()
}

const store=createStore(rootReducer,initialState,middlewares)

export default store